package leaveSystem.model;
import java.io.Serializable;
import java.util.Date;

public class EmployeeWorkschedule implements Cloneable, Serializable{

		private int workscheduleId;
	    private int employeeId;
	    private Date day;
	    private Date startTime;
	    private Date endTime;
	    private int compensationHours;
	    public Date getDay() {
			return day;
		}

		public void setDay(Date day) {
			this.day = day;
		}

		public Date getStartTime() {
			return startTime;
		}

		public void setStartTime(Date startTime) {
			this.startTime = startTime;
		}

		public Date getEndTime() {
			return endTime;
		}

		public void setEndTime(Date endTime) {
			this.endTime = endTime;
		}

		public Date getCreatedTimeStamp() {
			return createdTimeStamp;
		}

		public void setCreatedTimeStamp(Date createdTimeStamp) {
			this.createdTimeStamp = createdTimeStamp;
		}

		public Date getUpdatedTimeStamp() {
			return updatedTimeStamp;
		}

		public void setUpdatedTimeStamp(Date updatedTimeStamp) {
			this.updatedTimeStamp = updatedTimeStamp;
		}

		private String remarks;
	    private String createdBy;
	    private Date createdTimeStamp;
	    private String updatedBy;
	    private Date updatedTimeStamp;

	    public EmployeeWorkschedule () {

	    }

	    public EmployeeWorkschedule (int workscheduleIdIn) {

	          this.workscheduleId = workscheduleIdIn;

	    }

	    public int getWorkscheduleId() {
	          return this.workscheduleId;
	    }
	    public void setWorkscheduleId(int workscheduleIdIn) {
	          this.workscheduleId = workscheduleIdIn;
	    }

	    public int getEmployeeId() {
	          return this.employeeId;
	    }
	    public void setEmployeeId(int employeeIdIn) {
	          this.employeeId = employeeIdIn;
	    }

	    public int getCompensationHours() {
	          return this.compensationHours;
	    }
	    public void setCompensationHours(int compensationHoursIn) {
	          this.compensationHours = compensationHoursIn;
	    }

	    public String getRemarks() {
	          return this.remarks;
	    }
	    public void setRemarks(String remarksIn) {
	          this.remarks = remarksIn;
	    }

	    public String getCreatedBy() {
	          return this.createdBy;
	    }
	    public void setCreatedBy(String createdByIn) {
	          this.createdBy = createdByIn;
	    }


	    public String getUpdatedBy() {
	          return this.updatedBy;
	    }
	    public void setUpdatedBy(String updatedByIn) {
	          this.updatedBy = updatedByIn;
	    }

	    public void setAll(int workscheduleIdIn,
	          int employeeIdIn,
	          java.sql.Date dayIn,
	          java.sql.Date startTimeIn,
	          java.sql.Date endTimeIn,
	          int compensationHoursIn,
	          String remarksIn,
	          String createdByIn,
	          java.sql.Date createdTimeStampIn,
	          String updatedByIn,
	          java.sql.Date updatedTimeStampIn) {
	          this.workscheduleId = workscheduleIdIn;
	          this.employeeId = employeeIdIn;
	          this.day = dayIn;
	          this.startTime = startTimeIn;
	          this.endTime = endTimeIn;
	          this.compensationHours = compensationHoursIn;
	          this.remarks = remarksIn;
	          this.createdBy = createdByIn;
	          this.createdTimeStamp = createdTimeStampIn;
	          this.updatedBy = updatedByIn;
	          this.updatedTimeStamp = updatedTimeStampIn;
	    }


	    public boolean hasEqualMapping(EmployeeWorkschedule valueObject) {

	          if (valueObject.getWorkscheduleId() != this.workscheduleId) {
	                    return(false);
	          }
	          if (valueObject.getEmployeeId() != this.employeeId) {
	                    return(false);
	          }
	          if (this.day == null) {
	                    if (valueObject.getDay() != null)
	                           return(false);
	          } else if (!this.day.equals(valueObject.getDay())) {
	                    return(false);
	          }
	          if (this.startTime == null) {
	                    if (valueObject.getStartTime() != null)
	                           return(false);
	          } else if (!this.startTime.equals(valueObject.getStartTime())) {
	                    return(false);
	          }
	          if (this.endTime == null) {
	                    if (valueObject.getEndTime() != null)
	                           return(false);
	          } else if (!this.endTime.equals(valueObject.getEndTime())) {
	                    return(false);
	          }
	          if (valueObject.getCompensationHours() != this.compensationHours) {
	                    return(false);
	          }
	          if (this.remarks == null) {
	                    if (valueObject.getRemarks() != null)
	                           return(false);
	          } else if (!this.remarks.equals(valueObject.getRemarks())) {
	                    return(false);
	          }
	          if (this.createdBy == null) {
	                    if (valueObject.getCreatedBy() != null)
	                           return(false);
	          } else if (!this.createdBy.equals(valueObject.getCreatedBy())) {
	                    return(false);
	          }
	          if (this.createdTimeStamp == null) {
	                    if (valueObject.getCreatedTimeStamp() != null)
	                           return(false);
	          } else if (!this.createdTimeStamp.equals(valueObject.getCreatedTimeStamp())) {
	                    return(false);
	          }
	          if (this.updatedBy == null) {
	                    if (valueObject.getUpdatedBy() != null)
	                           return(false);
	          } else if (!this.updatedBy.equals(valueObject.getUpdatedBy())) {
	                    return(false);
	          }
	          if (this.updatedTimeStamp == null) {
	                    if (valueObject.getUpdatedTimeStamp() != null)
	                           return(false);
	          } else if (!this.updatedTimeStamp.equals(valueObject.getUpdatedTimeStamp())) {
	                    return(false);
	          }

	          return true;
	    }


	    public String toString() {
	        StringBuffer out = new StringBuffer("");
	        out.append("\nclass EmployeeWorkschedule, mapping to table employee_workschedule\n");
	        out.append("Persistent attributes: \n"); 
	        out.append("workscheduleId = " + this.workscheduleId + "\n"); 
	        out.append("employeeId = " + this.employeeId + "\n"); 
	        out.append("day = " + this.day + "\n"); 
	        out.append("startTime = " + this.startTime + "\n"); 
	        out.append("endTime = " + this.endTime + "\n"); 
	        out.append("compensationHours = " + this.compensationHours + "\n"); 
	        out.append("remarks = " + this.remarks + "\n"); 
	        out.append("createdBy = " + this.createdBy + "\n"); 
	        out.append("createdTimeStamp = " + this.createdTimeStamp + "\n"); 
	        out.append("updatedBy = " + this.updatedBy + "\n"); 
	        out.append("updatedTimeStamp = " + this.updatedTimeStamp + "\n"); 
	        return out.toString();
	    }

	    public Object clone() {
	        EmployeeWorkschedule cloned = new EmployeeWorkschedule();

	        cloned.setWorkscheduleId(this.workscheduleId); 
	        cloned.setEmployeeId(this.employeeId); 
	        if (this.day != null)
	             cloned.setDay((java.sql.Date)this.day.clone()); 
	        if (this.startTime != null)
	             cloned.setStartTime((java.sql.Date)this.startTime.clone()); 
	        if (this.endTime != null)
	             cloned.setEndTime((java.sql.Date)this.endTime.clone()); 
	        cloned.setCompensationHours(this.compensationHours); 
	        if (this.remarks != null)
	             cloned.setRemarks(new String(this.remarks)); 
	        if (this.createdBy != null)
	             cloned.setCreatedBy(new String(this.createdBy)); 
	        if (this.createdTimeStamp != null)
	             cloned.setCreatedTimeStamp((java.sql.Date)this.createdTimeStamp.clone()); 
	        if (this.updatedBy != null)
	             cloned.setUpdatedBy(new String(this.updatedBy)); 
	        if (this.updatedTimeStamp != null)
	             cloned.setUpdatedTimeStamp((java.sql.Date)this.updatedTimeStamp.clone()); 
	        return cloned;
	    }

}
